package ucam.acciones;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.tiles.Attribute;
import org.apache.tiles.AttributeContext;

public class ActionPorDefecto extends Accion {
	@Override
	public void execute(HttpServletRequest req, HttpServletResponse resp) {
		this.setDefinition("myapp.homepage");
		renderPage(req, resp);
	}

	@Override
	protected void doAttributeContext(AttributeContext attributeContext) {
		attributeContext.putAttribute("header",new Attribute("/jsp/tiles/banner.jsp"));
		attributeContext.putAttribute("menu",new Attribute("/jsp/tiles/common_menu.jsp"));
		attributeContext.putAttribute("body",new Attribute("/jsp/tiles/credits.jsp"));
		attributeContext.putAttribute("footer",new Attribute("/jsp/tiles/home_body.jsp"));
	}
}
